package test.db.table.oracle.type;

import test.db.table.Table;

/**
 * @author newbie
 * @since 0.1
 */
public enum PwBbsMemoTable implements Table, ColumnType {
    SID(Column.sid),
    BBS_NO(Column.bbsNo),
    DEPTH(Column.depth),
    USER_SID(Column.userSid),
    USER_PASSWD(Column.userPasswd),
    USER_NICK(Column.userNick),
    USER_ICON(Column.userIcon),
    USER_IP(Column.userIp),
    USER_COUNTRY(Column.userCountry),
    CONTENT(Column.content),
    BAD_CNT(Column.badCnt),
    DEL_YN(Column.delYn),
    REGIST_DATE(Column.registDate),
    REGIST_TIME(Column.registTime),
    MODIFY_DATE(Column.modifyDate),
    MODIFY_TIME(Column.modifyTime);
    
    private final Column column;
    private static final String TYPE_CONTENT = "CLOB";
    private static final String TYPE_BAD_CNT = "NUMBER(5)";
    private static final String TYPE_DEL_YN = "CHAR(1)";

    PwBbsMemoTable(Column column) {
        this.column = column;
    }
    
    private enum Column {
        sid {
            String getType() {
                return TYPE_SID;
            }
        },
        
        bbsNo {
            String getType() {
                return TYPE_BBS_NO;
            }
        },
        
        depth {
        	String getType() {
        		return TYPE_DEPTH;
        	}
        },
        
        userSid {
            String getType() {
                return TYPE_USER_SID;
            }
        },

        
        userPasswd {
        	String getType() {
        		return TYPE_USER_PASSWD;
        	}
        },
        
        userNick {
        	String getType() {
        		return TYPE_USER_NICK;
        	}
        },
        
        userIcon {
        	String getType() {
        		return TYPE_USER_ICON;
        	}
        },
        
        userIp {
        	String getType() {
        		return TYPE_USER_IP;
        	}
        },

        userCountry {
        	String getType() {
        		return TYPE_USER_COUNTRY;
        	}
        },
        
        content {
        	String getType() {
        		return TYPE_CONTENT;
        	}
        },
        
        badCnt {
        	String getType() {
        		return TYPE_BAD_CNT;
        	}
        },
        
        delYn {
        	String getType() {
        		return TYPE_DEL_YN;
        	}
        },
        
        registDate {
            String getType() {
                return TYPE_REGIST_DATE;
            }
        },
        
        registTime {
        	String getType() {
        		return TYPE_REGIST_TIME;
        	}
        },
        
        modifyDate {
        	String getType() {
        		return TYPE_MODIFY_DATE;
        	}
        },
        
        modifyTime {
            String getType() {
                return TYPE_MODIFY_TIME;
            }
        };
        
        abstract String getType();
    }
    
    public String getType() {
        return column.getType();
    }
    
    public void initData() throws Exception {
    }
}